﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BomberManServer.Gaming.Object.Mapping.Items
{
    // an item is on a block
    public abstract class Item
    {
        // if you can walk on it
        public bool free { protected set; get;}
        // if you cand destroy it
        public bool destructible { protected set; get; }
        // if the deflagration continues after hitting this item
        public bool propagation { protected set; get; }

        // what happens when you destroy it
        // return the new item that will be on the block
        public virtual Item actionDeflagration(Deflagration deflagration) 
        {
            if (this.propagation)
                return deflagration;
            else
                return this;
        }
        // what happens when you walk on it
        public virtual void actionWalk(Block block, Avatar avatar) 
        {
        }
    }
}
